home *** CD-ROM | disk | FTP | other *** search
- Option Explicit
- 'Kustom Magic Software, Copyright (c) 1995, Ralph Krausse
- 'File Created on 1/1/96 1:53:11 PM
-
-
- 'This user-defined data type is what gets passed to the
- 'function declared below. All fields must be filled out
- Type APPINFO
- bOverWriteSeal As Integer 'flag to over-write current seal
- szMagicString As String * 20 'magic string, this string detects the seal if there is one
- szAppName As String * 260 'Your magic string
- End Type
-
-
- Type Version
- iMajor As Integer ' Major version
- iMinor As Integer ' Minor version
- iPatch As Integer ' patch version
- bBeta As Integer ' is version a beta?
- End Type
-
- 'foo Type..........
- Type foo
- bFirstTime As Integer
- dtExpirationDate As Long
- szCompany As String * 60
- szName As String * 40
- szMagicString As String * 20
- End Type
-
-
- Global gApplicationInfo As APPINFO
- Global gfoo As foo
-
-
-
- 'Declarations...
- Declare Function ValidateApplication Lib "sealer.dll" (APPINFO As APPINFO, ByVal wSealBufferLen%, vpSealBuffer As Any) As Integer
- Declare Sub GetSealError Lib "sealer.dll" (ByVal wErr%, ByVal szErrorString$)
- Declare Function SealApplication Lib "sealer.dll" (APPINFO As APPINFO, ByVal wBufferLen%) As Integer
- Declare Function InitializeBuffer Lib "sealer.dll" (ByVal wLen%) As Integer
- Declare Sub SaveInt Lib "sealer.dll" (ByVal wValue%)
- Declare Sub SaveLong Lib "sealer.dll" (ByVal lValue&)
- Declare Sub SaveString Lib "sealer.dll" (ByVal lpszValue$, ByVal wLen%)
- Declare Sub DeInitializeBuffer Lib "sealer.dll" ()
- Declare Sub GetAPIVersion Lib "sealer.dll" (Version As Version)
-
- 'Time conversion
- Declare Function ConvertDateToLong Lib "sealer.dll" (ByVal wMonth%, ByVal wDay%, ByVal wYear%) As Long
- Declare Function ConvertDateFromLong Lib "sealer.dll" (ByVal lTime&, wMonth%, wDay%, wYear%) As Integer
-
- Function ConvertTime# (tmExpire&)
- Dim wMonth%, wDay%, wYear%, wHour%, wMinutes%
- Dim wErr%, szDateString$, szTimeString$
- wErr% = ConvertDateFromLong(tmExpire&, wMonth%, wDay%, wYear%)
- szDateString$ = wMonth% & "/" & wDay% & "/" & wYear%
- ConvertTime# = DateValue(szDateString$)
- End Function
-
-